//
//  GiftCollectionViewCell.m
//  B项目
//
//  Created by lanou on 15/12/18.
//  Copyright © 2015年 tzf. All rights reserved.
//

#import "GiftCollectionViewCell.h"

@implementation GiftCollectionViewCell


-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _imageV = [[UIImageView alloc] initWithFrame:(CGRectMake(5, 5, self.frame.size.width - 10, (self.frame.size.width - 10)*173 / 144  ))];
        _titleLabel = [[UILabel alloc] initWithFrame:(CGRectMake(0, self.frame.size.width - 5, self.frame.size.width, 20))];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        _titleLabel.textColor = [UIColor darkGrayColor];
        [self.contentView addSubview:_imageV];
        [self.contentView addSubview:_titleLabel];
        //        _titleLabel.textColor = [UIColor grayColor];
        _titleLabel.font = [UIFont boldSystemFontOfSize:10];
        
    }
    return self;
}




-(void)setModel:(GiftModel *)model
{
    _imageV.image = [UIImage imageNamed:@"zhanweipic.png"];
    _model = model;
    _titleLabel.text = model.name;
    _imageV.image = model.imageIcon;
}




@end
